feat(anolisa): add native dsh adapter - #2580
Conversation
There was a problem hiding this comment.
[P1] reenable 清理时将 dsh bundle 解析失败一律视为包名变更,可能误删仍应保留的 profile 注册。
[P2] dsh status 在 verification=Unknown 且存在潜在失败时仍回退为 Unknown,总体验上不易区分“部分失败”与“全部未知”。
[P2] dsh profile 名称校验缺少长度/前缀边界,与可能的上游约束不完全对齐。
🤖 Generated by Qoder • View workflow run
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 895940883b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8959408 to
9b96438
Compare
ikunkun-sys
left a comment
There was a problem hiding this comment.
Reviewed current head 9b96438 against the official DSH bundle and CLI contracts at deepseek-harness commit 47f9438. Local formatting, clippy, workspace tests, docs, and a synthetic merge with current main pass, but the four inline correctness issues below are blocking.
9b96438 to
54a3a9b
Compare
ikunkun-sys
left a comment
There was a problem hiding this comment.
The previous four blockers are addressed in this revision, and the current code and CI gates pass. One lifecycle correctness issue remains:
- P1: persist the enable-time DSH home/profile root and use it for both read-only verification and later DSH CLI cleanup. Re-resolving
DSH_HOMEduring status/disable can inspect and mutate a different profile tree, then discard the only receipt while the original registration remains. - P2: update the PR description: it still documents
name: ./dist/index.jseven though the implementation now correctly rejects path-valued plugin names, and its rollback command references the superseded9b96438ecommit.
54a3a9b to
8a90a28
Compare
|
Review update for
Validated with fmt, 15 DSH lifecycle tests, the Manager drift test, workspace clippy, full workspace tests, and docs. |
ikunkun-sys
left a comment
There was a problem hiding this comment.
Reviewed current head 8a90a287. The previous DSH-home persistence blocker and the stale PR description are addressed. Rust 1.88 formatting, workspace clippy/tests/docs, remote CI, and a synthetic merge with current main pass, but the re-enable migration issue in the inline P1 remains blocking.
- add generic DSH bundle validation and profile lifecycle - expose repeatable --profile selections through adapter enable - persist multi-profile receipts for status and cleanup Signed-off-by: kongche-jbw <kongche.jbw@alibaba-inc.com>
8a90a28 to
f4736bf
Compare
ikunkun-sys
left a comment
There was a problem hiding this comment.
Re-reviewed the current head. The prior DSH home migration issue is resolved: same-home retained profiles stay registered, while a home change cleans retained profiles from the persisted prior DSH_HOME before installing the replacement claim. The current head also passes the synthetic merge against latest main, formatting, workspace Clippy/tests/docs, targeted DSH and CLI tests, and remote CI. No remaining blocking findings.
Why
ANOLISA components need a framework-native way to register plugin bundles with
DeepSeek Harness without editing
$DSH_HOMEor maintaining component-specificinstall scripts. This adds a reusable DSH driver so Tokenless and future
components can use the same adapter contract and DSH-owned lifecycle.
What changed
dshframework driver that validatespackage.json, thenested
dsh.bundle.patchdeclaration, and the Cordis patch package identity.anolisa adapter enable <component> dsh --profile <name>selection and reject implicit or non-DSH profile usage.
dsh plugin --profile ..., persist onetyped receipt for all selected profiles, verify status using exact package
matches, and clean stale profiles during re-enable.
and re-enable cleanup remain anchored when
DSH_HOMEor the cwd changes.Other components can reuse the interface by declaring a normal ANOLISA adapter:
The source directory must contain an npm-compatible package name and nested DSH
bundle metadata:
{ "name": "@example/dsh-plugin", "dsh": { "bundle": { "patch": "./cordis.patch.yml" } } }The patch id must match
plugin_id, and the plugin name must match the packageinstalled by DSH:
ANOLISA then delegates registration to DSH with a
link:package reference;components do not write profile files directly.
Related issue
no-issue: introduce the shared DSH adapter contract needed by native plugins
User / Agent impact
Users can enable a component in one or more explicit DSH profiles:
Disable and status use both the profiles and DSH home recorded by the enable
receipt.
Risk and compatibility
The change adds a
profilesfield toEnableOptionsand adshreceiptpayload, including the validated enable-time DSH home resource. Before
downgrading to an ANOLISA version without this driver, disable all DSH adapters
so older binaries do not encounter the new receipt variant.
Validation
cargo fmt --all -- --checkcargo test -p anolisa-core --lockedcargo test -p anolisa-cli enable_parses_repeatable_profiles --lockedcargo clippy -p anolisa-core --all-targets --locked -- -D warningscargo clippy -p anolisa-cli --all-targets --locked -- -D warningscargo doc --workspace --no-deps --lockedgit diff --checkDocumentation and rollback
The public Rust items and CLI help document the new contract; no standalone
guide is added in this change. Roll back by disabling DSH adapters first and
then reverting this PR's feature commit.